Skip to content

docs(postgres): restore IaC guides (Terraform, Pulumi, Alchemy)#7566

Merged
AmanVarshney01 merged 11 commits intomainfrom
docs/restore-iac-guides
Feb 26, 2026
Merged

docs(postgres): restore IaC guides (Terraform, Pulumi, Alchemy)#7566
AmanVarshney01 merged 11 commits intomainfrom
docs/restore-iac-guides

Conversation

@AmanVarshney01
Copy link
Member

@AmanVarshney01 AmanVarshney01 commented Feb 26, 2026

Summary

  • Restores the Terraform, Pulumi, and Alchemy Infrastructure as Code guides that were lost during the docs restructure
  • Adds a new Infrastructure as Code section to the Postgres sidebar
  • Guides cover provisioning and managing Prisma Postgres projects, databases, and connections with each tool

Test plan

  • Verify the IaC section appears in the Postgres sidebar
  • Check Terraform, Pulumi, and Alchemy pages render correctly
  • Confirm package manager tab switcher works on Alchemy workflow commands

Summary by CodeRabbit

  • Documentation
    • Added a new Infrastructure-as-Code section for Postgres.
    • Added Alchemy guide covering concepts, lifecycle, examples, workflows, auth, troubleshooting, and teardown.
    • Added Terraform and Pulumi guides with usage patterns, examples, deployment, and cleanup notes.
    • Updated Postgres documentation navigation to include the new IaC section.
    • Extended documentation spelling dictionary with Pulumi-related terms.

@vercel
Copy link

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Feb 26, 2026 8:46am
docs Ready Ready Preview, Comment Feb 26, 2026 8:46am
eclipse Ready Ready Preview, Comment Feb 26, 2026 8:46am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

Walkthrough

Adds a new "Infrastructure as Code" subsection for Prisma Postgres with three provider guides (Terraform, Pulumi, Alchemy), introduces an IaC meta file and navigation entries, and updates the docs spellcheck vocabulary with a few provider-related words.

Changes

Cohort / File(s) Summary
IaC Tool Documentation
apps/docs/content/docs/postgres/iac/terraform.mdx, apps/docs/content/docs/postgres/iac/pulumi.mdx, apps/docs/content/docs/postgres/iac/alchemy.mdx
Adds three new MDX pages detailing Terraform, Pulumi, and Alchemy usage for Prisma Postgres: conceptual model, examples, prerequisites, deploy/teardown commands, authentication, secrets, troubleshooting, and references.
IaC Navigation & Metadata
apps/docs/content/docs/postgres/meta.json, apps/docs/content/docs/postgres/iac/meta.json
Adds an IaC meta file and inserts an "Infrastructure as Code" section and link into the Postgres docs navigation/meta.
Docs Spellcheck Vocabulary
apps/docs/cspell.json
Appends new words (packagemanager, prsc, pulumi, Pulumi) to the documentation spellchecker word list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main objective: restoring three Infrastructure as Code documentation guides (Terraform, Pulumi, Alchemy) for Postgres.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@argos-ci
Copy link

argos-ci bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 1 removed Feb 26, 2026, 8:52 AM

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/docs/content/docs/postgres/iac/pulumi.mdx`:
- Line 37: The internal link
"/postgres/introduction/management-api#service-tokens" in the line containing "A
Prisma service token (see ...)" is broken; update that anchor to the current
Management API page path/anchor (replace the href portion only) so the link
points to the correct Management API doc and specific "service tokens" section;
search for the exact string
"/postgres/introduction/management-api#service-tokens" to locate and replace it
with the new path/anchor used by the docs site.

In `@apps/docs/content/docs/postgres/iac/terraform.mdx`:
- Line 44: Replace the broken internal link
`/postgres/introduction/management-api#service-tokens` with the correct path
`/management-api/authentication#service-tokens` in the IaC docs; specifically
update the link text in the files where it appears
(`apps/docs/content/docs/postgres/iac/terraform.mdx` and
`apps/docs/content/docs/postgres/iac/pulumi.mdx`) so any reference to
`/postgres/introduction/management-api#service-tokens` is changed to
`/management-api/authentication#service-tokens`.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9896804 and 13087e8.

📒 Files selected for processing (5)
  • apps/docs/content/docs/postgres/iac/alchemy.mdx
  • apps/docs/content/docs/postgres/iac/meta.json
  • apps/docs/content/docs/postgres/iac/pulumi.mdx
  • apps/docs/content/docs/postgres/iac/terraform.mdx
  • apps/docs/content/docs/postgres/meta.json

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 26, 2026
ankur-arch
ankur-arch previously approved these changes Feb 26, 2026
Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com>
coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 26, 2026
Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com>
Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com>
coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 26, 2026
@AmanVarshney01 AmanVarshney01 merged commit 8680b97 into main Feb 26, 2026
8 of 13 checks passed
@AmanVarshney01 AmanVarshney01 deleted the docs/restore-iac-guides branch February 26, 2026 08:51
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
apps/docs/content/docs/postgres/iac/alchemy.mdx (1)

189-190: Consider avoiding any type in the example.

Using error: any is a common TypeScript anti-pattern that documentation examples inadvertently teach. Consider using unknown with a type guard, or simply accessing the error message safely.

💡 Cleaner error handling pattern
-    } catch (error: any) {
-      return new Response(`Database error: ${error.message}`, { status: 500 });
+    } catch (error) {
+      const message = error instanceof Error ? error.message : String(error);
+      return new Response(`Database error: ${message}`, { status: 500 });
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/postgres/iac/alchemy.mdx` around lines 189 - 190, The
catch block currently types the caught value as error: any; change this to
error: unknown and handle it safely before using .message — for example, in the
same catch block inside the function (the catch that returns new Response(...)),
add a narrow/guard that checks if error is an object with a string message (or
use String(error)) and then pass that safe message into new Response(`Database
error: ${message}`, { status: 500 }); so only a properly-typed message is
accessed instead of using any.
apps/docs/content/docs/postgres/iac/pulumi.mdx (1)

54-56: Consider noting that the provider version should be updated periodically.

Hardcoding 0.2.0 is fine for documentation, but users should know to check for the latest version. The references section does link to the Terraform Registry where users can find the current version, which helps.

💡 Optional enhancement

You could add a brief note that users should check the registry for the latest version:

 ```bash
-pulumi package add terraform-provider registry.terraform.io/prisma/prisma-postgres 0.2.0
+pulumi package add terraform-provider registry.terraform.io/prisma/prisma-postgres 0.2.0  # Check registry for latest version

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @apps/docs/content/docs/postgres/iac/pulumi.mdx around lines 54 - 56, Update
the pulumi package example that uses the command "pulumi package add
terraform-provider registry.terraform.io/prisma/prisma-postgres 0.2.0" to
include a brief note reminding users to check the Terraform Registry for the
latest provider version (or replace the hardcoded version with a placeholder
like ), e.g., add one-line guidance after the command indicating
the version should be updated periodically and where to find the current
version.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @apps/docs/content/docs/postgres/iac/alchemy.mdx:

  • Around line 189-190: The catch block currently types the caught value as
    error: any; change this to error: unknown and handle it safely before using
    .message — for example, in the same catch block inside the function (the catch
    that returns new Response(...)), add a narrow/guard that checks if error is an
    object with a string message (or use String(error)) and then pass that safe
    message into new Response(Database error: ${message}, { status: 500 }); so
    only a properly-typed message is accessed instead of using any.

In @apps/docs/content/docs/postgres/iac/pulumi.mdx:

  • Around line 54-56: Update the pulumi package example that uses the command
    "pulumi package add terraform-provider
    registry.terraform.io/prisma/prisma-postgres 0.2.0" to include a brief note
    reminding users to check the Terraform Registry for the latest provider version
    (or replace the hardcoded version with a placeholder like ),
    e.g., add one-line guidance after the command indicating the version should be
    updated periodically and where to find the current version.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between d0973091dc06bbc0eb5a0c852c787525e3ce8e5b and 1bf5765790ac781106cad6612d33eaea095299de.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `apps/docs/content/docs/postgres/iac/alchemy.mdx`
* `apps/docs/content/docs/postgres/iac/pulumi.mdx`
* `apps/docs/content/docs/postgres/meta.json`

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* apps/docs/content/docs/postgres/meta.json

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants